import fetch from 'common/src/utils/fetch'

/**
 * 必修环节权限查询
 */
export function findAll(data) {
  return fetch({
    url: '/api/scoremanagementservice/compulsoryCourseAuth/listCompulsoryCourseAuthPage',
    method: 'post',
    data
  })
}

/**
 * 保存新增的必修环节录入权限设置
 */
export function saveCompulsoryCourseAuth(data) {
  return fetch({
    url: '/api/scoremanagementservice/compulsoryCourseAuth/saveCompulsoryCourseAuth',
    method: 'post',
    data
  })
}

/**
 * 增加必修环节权限
 */
export function setting(data) {
  return fetch({
    url: '/api/scoremanagementservice/compulsoryCourseAuth/saveCompulsoryCourseAuth',
    method: 'post',
    data
  })
}

/**
 * 编辑查看必修环节权限信息
 * @param params
 */
export function findCompulsoryCourseAuthById(params) {
  return fetch({
    url: '/api/scoremanagementservice/compulsoryCourseAuth/findCompulsoryCourseAuthById',
    method: 'get',
    params: params
  })
}

/**
 * 通过权限ID删除必修环节权限
 * @param params
 */
export function deleteCompulsoryCourseAuth(data) {
  return fetch({
    url: '/api/scoremanagementservice/compulsoryCourseAuth/batchDelCompulsoryCourseAuth',
    method: 'DELTE',
    data
  })
}

/**
 * 学生成绩列表分页查询
 */
export function listCompulsoryCoursePage(data) {
  return fetch({
    url: '/api/scoremanagementservice/compulsoryCourseScore/listCompulsoryCoursePage',
    method: 'post',
    data
  })
}

/**
 * 查询必修环节课程成绩列表接口（ 成绩录入按钮也用此接口）
 */
export function listCompulsoryCourseScorePage(data) {
  return fetch({
    url: '/api/scoremanagementservice/compulsoryCourseScore/listCompulsoryCourseScorePage',
    method: 'post',
    data
  })
}